﻿using System.Web.Mvc;
using CP_SchoolForChildren_v0._1.Controllers.Support;

namespace CP_SchoolForChildren_v0._1.Controllers.BE
{
    public class AdminController : Controller
    {
        FunctionController fc = new FunctionController();
        //
        // GET: /Admin/

        [Authorize(Roles="Admin")]
        public ActionResult Index()
        {
            return View();
        }


        //public ActionResult LogOn()
        //{
        //    if (Request.IsAuthenticated == true)
        //    {
        //        //Get Role ID of current User
        //        int roleID = fc.CurrentUserRoleID();
                
        //        // Admin -> to Admin ! Editor -> Editor
        //        if (roleID == 1)
        //        {
        //            return RedirectToAction("Index", "Admin");
        //        }
        //        else if (roleID == 2)
        //        {
        //            return RedirectToAction("Index", "Editor");
        //        }
        //    }
            
        //    //Redirect if not loged in
        //    return RedirectToAction("LogOn","Account");
        //}
    }
}
